<template>
	<view class="web_d_view">
		<view class="" v-if="image">
			<image :src="baseUrl+image" class="c_c_img"></image>
		</view>
		<view class="c_tite">
			{{title}}
		</view>
		<view class="c_time">
			{{createtime}}
		</view>
		<view class="c_content" v-html="content"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:"",
				content:"",
				image:"",
				createtime:""
				
			};
		},
		computed:{
			baseUrl(){
				return this.$store.state.baseUrl
			}
		},
		onLoad(ph) {
			if(ph.type == 'zhongkao'){
				uni.setNavigationBarTitle({
					title:"中考相关"
				})
			}else
			if(ph.type == 'remen'){
				uni.setNavigationBarTitle({
					title:"热门问答"
				})
			}else
			if(ph.type == 'zixun'){
				uni.setNavigationBarTitle({
					title:"招生资讯"
				})
			}
			this.$queryApi("post","/school.school/article", {
				id:ph.id
			}, res => {
				console.log(res)
				this.title = res.data.title;
				this.content = res.data.content;
				this.image = res.data.image;
				this.createtime = res.data.createtime;
			},"","noMsg")
		}
	}
</script>

<style lang="scss">
.web_d_view{
	min-height: 100vh;
	background-color: #fff;
	.c_tite{
		padding: 30rpx 30rpx 10rpx;
		font-weight: bold;
		font-size: 32rpx;
	}
	.c_time{
		font-size: 24rpx;
		padding: 0rpx 30rpx 20rpx;
		color: #666;
	}
	.c_content{
		padding:10rpx 30rpx 30rpx;
		font-size: 30rpx;
	}
	.c_c_img{
		width: 750rpx;
		// height: auto;
	}
}
</style>
